home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 4234 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.5 KB  |  48 lines

  1. Path: god.bel.alcatel.be!nlev00!barnhoorn
  2. From: barnhoorn@nlev00 ()
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Need little C Help! (How to make caracters apear on the same spot again and again?)
  5. Date: 26 Feb 1996 08:49:13 GMT
  6. Organization: Alcatel Bell
  7. Distribution: world
  8. Message-ID: <4grs69$puv@btmpjg.god.bel.alcatel.be>
  9. References: <4gjudo$i95@news.xs4all.nl>
  10. Reply-To: barnhoorn@nlev00 ()
  11. NNTP-Posting-Host: 138.203.178.61
  12. X-Newsreader: mxrn 6.18-10
  13.  
  14.  
  15. In article <4gjudo$i95@news.xs4all.nl>, vasquez@xs4all.nl (Joel Wijngaarde) writes:
  16. |> Hello,
  17. |> 
  18. |> Can somebody tel me how i can make a counter in C wich counts at the same 
  19. |> screen position. I'm mean something like the in the program 'Lha'. This 
  20. |> program counts the bytes, that are (un)packed. The number of bytes 
  21. |> increases on the same spot; NOT like this: 
  22. |> 1 2 3 4 5 6 7 8 9 10 11 12 etc....
  23. |> 
  24.  
  25. How about this:
  26.  
  27. main()
  28. {
  29.     int c;
  30.     for (c=1;c>13;c++) {
  31.         printf(" NOT like this: %d etc...\r",c);
  32.             /* the string starts with a space, this is where
  33.                the cursor will be after the '\r' */
  34.         fflush(stdout);
  35.             /* this is important, because without it, the
  36.                printed string is not displayed until a
  37.                '\n' is printed */
  38.     }
  39.     printf("\n");
  40. }
  41.  
  42. ---------------------------------------------------------------------------
  43. Jaco Barnhoorn               barnie@xs4all.nl
  44. Software Test Engineer       barnhoorn%nlev00@btmv56.se.bel.alcatel.be
  45. Alcatel Telecom Systems
  46. Rijswijk, The Netherlands
  47. ---------------------------------------------------------------------------
  48.